<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#getWeatherReport").click(function() {
			$cityName = document.getElementById("cityName").value;
			$.post("weather", {cityName:$cityName}, function(xml) {
				$("#weatherReport").html($("report", xml).text());
			});
		});
	});
</script>
<title>Weather forecast</title>
</head>
<body>
	<form name="form1" type="get" method="post">
    	Enter City :
    	<input type="text" name="cityName" id="cityName" size="30" />
    	<input type="button" name="getWeatherReport" id="getWeatherReport"
        	value="Get Weather" />
	</form>
	<div id="weatherReport" class="outputTextArea"></div>
</body>
</html>